﻿@model Apps.Models.PUB.PUB_CY_STOCKPILEModel
@using Apps.Web.Core;
@using Apps.Common;
@using Apps.Models.PUB;
@using Apps.Web;
@using Apps.Locale;
@using Apps.Models.Sys;
@{
    ViewBag.Title = "修改";
    Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
    List<permModel> perm = null;
}

<script type="text/javascript">
$(function () {
    $("#btnSave").click(function () {
        if ($("form").valid()) {
            $.ajax({
                url: "@Url.Action("Edit")",
                type: "Post",
                data: $("form").serialize(),
                dataType: "json",
                success: function (data) {
                    if (data.type == 1) {
                        window.parent.frameReturnByMes(data.message);
                        window.parent.frameReturnByReload(false);
                        window.parent.frameReturnByClose()
                    }
                    else {
                        window.parent.frameReturnByMes(data.message);
                    }
                }
            });
        }
        return false;
    });
    $("#btnReturn").click(function () {
         window.parent.frameReturnByClose();
    });
});
</script>
<div class="mvctool bgb">
@Html.ToolButton("btnSave", "fa fa-save", Resource.Save,ref perm, "Save", true)
@Html.ToolButton("btnReturn", "fa fa-reply", Resource.Reply,false)
</div>
@using (Html.BeginForm())
{
            @Html.HiddenFor(model => model.STOCKPILE_ID)
            <table class="formtable">
                <tbody>
                    <tr>
                        <th>
                            @Html.LabelFor(model => model.STOCKPILE_NAME,0)：
                        </th>
                        <td>
                            @Html.EditorFor(model => model.STOCKPILE_NAME)
                        </td>
                    </tr>
                    <tr>
                        <th>
                            @Html.LabelFor(model => model.PARTITION_ID,0)：
                        </th>
                        <td>
                            @Html.DropDownListFor(model => model.PARTITION_ID, ViewBag.CyPartition as SelectList)
                        </td>
                    </tr>
                    <tr>
                        <th>
                            @Html.LabelFor(model => model.BEGIN_HEIGHT,0)：
                        </th>
                        <td>
                            @Html.EditorFor(model => model.BEGIN_HEIGHT)
                        </td>
                    </tr>
                    <tr>
                        <th>
                            @Html.LabelFor(model => model.END_HEIGHT,0)：
                        </th>
                        <td>
                            @Html.EditorFor(model => model.END_HEIGHT)
                        </td>
                    </tr>
                    <tr>
                        <th>
                            @Html.LabelFor(model => model.BEGIN_WIDTH,0)：
                        </th>
                        <td>
                            @Html.EditorFor(model => model.BEGIN_WIDTH)
                        </td>
                    </tr>
                    <tr>
                        <th>
                            @Html.LabelFor(model => model.END_WIDTH,0)：
                        </th>
                        <td>
                            @Html.EditorFor(model => model.END_WIDTH)
                        </td>
                    </tr>
                    <tr>
                        <th>
                            @Html.LabelFor(model => model.BEGIN_LENGTH,0)：
                        </th>
                        <td>
                            @Html.EditorFor(model => model.BEGIN_LENGTH)
                        </td>
                    </tr>
                    <tr>
                        <th>
                            @Html.LabelFor(model => model.END_LENGTH,0)：
                        </th>
                        <td>
                            @Html.EditorFor(model => model.END_LENGTH)
                        </td>
                    </tr>
                </tbody>
            </table>
  @Html.ValidationSummary()
}

